<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        console.log(a);
        var a = 10;
        console.log(a);
        foo()
    function foo() {
        console.log('hello');
    }
    function func() {
        var b = 20;
        fn1();
        function fn1 () {
            console.log(b);
        }
    }
    func();
    function fn2 () {
        var count = 100;
    }
    fn2();
    function fn3(num) {
        console.log(num);
        var num = 150;
        console.log(num);
        
    }
    fn3(200);
    function fn4(k){
        console.log(k);
        var k;
        console.log(k);
        
    }
    fn4(20);
    function fn5(fo1) {
        console.log(fo1);
        function fo1 () {
            console.log('这是函数fo1');
            
        }
        console.log(fo1);
        
    }
    fn5(300)
    </script>
</body>
</html>